package com.winter.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.winter.model.CompanyPosition;

@Repository
public interface CompanyPositionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CompanyPosition record);

    int insertSelective(CompanyPosition record);

    /**
     * 根据id查询职场详情
     */
    List<CompanyPosition> selectByPrimaryKey(@Param("id") Long id, @Param("createUser") String createUser, @Param("open") Short open, @Param("auditing") Short auditing);

    /**
     * 根据id查询职场详情
     */
    int selectByCountKey(@Param("compyId") Long compyId, @Param("createUser") String createUser, @Param("open") Short open, @Param("auditing") Short auditing);

    int updateByPrimaryKeySelective(CompanyPosition record);

    int updateByPrimaryKeyWithBLOBs(CompanyPosition record);

    int updateByPrimaryKey(CompanyPosition record);

    /**
     * \
     * 职场列表查询
     */
    List<CompanyPosition> queryPageList(@Param("compId") Long compId, @Param("orderBy") String orderBy, @Param("timeStart") String timeStart, @Param("timeEnd") String timeEnd, @Param("companyIndustry") String companyIndustry, @Param("companyName") String companyName, @Param("userNo") String userNo, @Param("open") Short open, @Param("auditing") Short auditing, @Param("key") String key);

    /**
     * \
     * 我的信息  应聘的职位列表
     */
    List<CompanyPosition> queryPageUserList(@Param("companyId") String companyId, @Param("orderBy") String orderBy, @Param("userNo") String userNo, @Param("open") Short open, @Param("auditing") Short auditing, @Param("jobtype") Short jobtype);

    List<CompanyPosition> queryPageJobFunctionList(@Param("orderBy") String orderBy, @Param("userNo") String userNo, @Param("companyLike") String companyLike);

    int querySumCount(@Param("createUser") String createUser, @Param("auditing") Short auditing);

    List<CompanyPosition> queryGroomList(@Param("jobFunction") String jobFunction,@Param("ids") List<Long> ids);

    /**
     * 通过公司id获取发布职位总数
     */
    int companyCount(@Param("companyId") Long companyId);
    
    int queryPageCount(@Param("companyId") Long companyId);

    CompanyPosition selectById(@Param("id") Long id);
}